package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qf.mapper.DtsAdminMapper;
import com.qf.pojo.DtsAdmin;
import com.qf.vo.CatVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AdminServiceImpl  implements AdminService{

    @Autowired
    private DtsAdminMapper adminMapper;

    @Override
    public List<DtsAdmin> findAdminUserName(String userName) {
        QueryWrapper queryWrapper = new QueryWrapper();

        queryWrapper.eq("username",userName);
        queryWrapper.eq("deleted",false);

        List<DtsAdmin> list = adminMapper.selectList(queryWrapper);
        return list;
    }


    @Override
    public List<DtsAdmin> selectAll() {
        QueryWrapper<DtsAdmin> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("deleted",false);
        List<DtsAdmin> list = adminMapper.selectList(queryWrapper);
        return list;
    }
}
